import { get, post, post_json } from '@/http/axios'
export default {
    namespaced: true,
    state: {
        // 栏目数据
        categoryData:[],
    },
    mutations: {
        SET_CATEGORYDATA(state,payload)
        {
            state.categoryData = payload
        }
    },
    actions: {
        // 获取所有分类
        async getAllCategoryData({commit},payload)
        {
            const res = await get('/productCategory/pageQuery',payload)
            commit('SET_CATEGORYDATA',res.data.data.list)
        }
    }
}
